<template>
  <gui-page :custom-header="true" :full-page="true" :status-bar-class="['gui-bg-white']">
    <template #gHeader>
      <view class="gui-flex gui-nowrap gui-rows gui-align-items-center gui-bg-white" style="height: 44px">
        <!-- 导航文本此处也可以是其他自定义内容 -->
        <gui-header-leading :home="false" />
        <text class="gui-h5 gui-flex1 gui-text-center gui-ellipsis gui-primary-text">详情</text>
        <!-- 此处加一个右侧展位元素与左侧同宽，实现标题居中 -->
        <view style="width: 120rpx" />
      </view>
    </template>
    <template #gBody>
      <view class="gui-bg-white gui-dark-bg-level-3 gui-padding">
        <rich-text :nodes="nodes" />
        <view style="height: 80rpx" />
      </view>
    </template>
  </gui-page>
</template>
<script>
import parserHtml from '@/Grace6/js/parserHTML.js'
export default {
  data() {
    return { nodes: '' }
  },
  onLoad: function () {
    uni.request({
      url: 'https://www.graceui.com/api/richtext',
      success: (res) => {
        // 强化 richText
        this.nodes = parserHtml.parserHTML(res.data)
      },
    })
  },
}
</script>
<style scoped></style>
